import React from 'react';
import "./index.less";
import 'antd/dist/antd.css';
import { history } from "umi";
import { HomeFilled , AppstoreFilled , ShoppingCartOutlined , UserOutlined } from '@ant-design/icons';

function index(props:any) {
    return (
        <div className="layouts">
            <main>
                {props.children}
            </main>
            <footer>
                <div onClick={()=>{history.push("/home")}}>
                <HomeFilled />
                <p>首页</p>
                </div>
                <div onClick={()=>{history.push("/classify")}}>
                <AppstoreFilled />
                <p>分类</p>
                </div>
                <div onClick={()=>{history.push("/shop")}}>
                <ShoppingCartOutlined />
                <p>购物车</p>
                </div>
                <div onClick={()=>{history.push("/my")}}>
                <UserOutlined />
                <p>我的</p>
                </div>
            </footer>
        </div>
    )
}

export default index
